Skip to content

feat: Add icon validation to publish event#1766

Merged
netomi merged 2 commits intoeclipse-openvsx:mainfrom
autumnfound:malowe/main/svg-icons-handling
Apr 20, 2026
Merged

feat: Add icon validation to publish event#1766
netomi merged 2 commits intoeclipse-openvsx:mainfrom
autumnfound:malowe/main/svg-icons-handling

Conversation

@autumnfound
Copy link
Copy Markdown
Contributor

To lockdown unwanted formats for icons, a check was added at publish time to ensure that files of those formats aren't included in the payload.

To lockdown unwanted formats for icons, a check was added at publish time to ensure that files of those formats aren't included in the payload.
@autumnfound autumnfound requested a review from netomi April 15, 2026 14:52
}

private void validateIcon(ExtensionProcessor processor, ExtensionVersion extVersion) {
try (var iconTmpFile = processor.getIcon(extVersion)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an extension might not have an icon defined, so this method might return null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also please follow the indentation style used in the source file you are editing. Currently there are 4 spaces used.

}

private byte[] createExtensionPackage(String name, String version, String license, boolean preRelease, String targetPlatform) throws IOException {
private byte[] createExtensionPackage(String name, String version, String license, boolean preRelease, String targetPlatform, String iconPath) throws IOException {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not clear why this parameter has been added in this test. Is it to make sure that all test extensions have an icon defined as otherwise the tests fail?

@netomi netomi merged commit 132b1bc into eclipse-openvsx:main Apr 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants